'use strict';

module.exports = {
  up: async (queryInterface, Sequelize) => {
    await queryInterface.addColumn('customers', 'value_score', {
      type: Sequelize.DECIMAL(3, 1),
      allowNull: true,
      comment: '客户价值评分'
    });
    
    await queryInterface.addColumn('customers', 'potential_score', {
      type: Sequelize.DECIMAL(3, 1),
      allowNull: true,
      comment: '合作潜力评分'
    });
    
    await queryInterface.addColumn('customers', 'satisfaction_score', {
      type: Sequelize.DECIMAL(3, 1),
      allowNull: true,
      comment: '满意度评分'
    });
    
    await queryInterface.addColumn('customers', 'risk_level', {
      type: Sequelize.STRING(20),
      allowNull: true,
      comment: '风险等级'
    });
    
    await queryInterface.addColumn('customers', 'evaluation_remark', {
      type: Sequelize.TEXT,
      allowNull: true,
      comment: '评估备注'
    });
  },

  down: async (queryInterface, Sequelize) => {
    await queryInterface.removeColumn('customers', 'value_score');
    await queryInterface.removeColumn('customers', 'potential_score');
    await queryInterface.removeColumn('customers', 'satisfaction_score');
    await queryInterface.removeColumn('customers', 'risk_level');
    await queryInterface.removeColumn('customers', 'evaluation_remark');
  }
};